This invention relates to an image processing apparatus and method and, more particularly, to an image processing apparatus and method for embedding prescribed information in image data.
Various electronic watermark techniques have been developed in order to protect the copyright of digital content. According to one example of an electronic watermark technique, information relating to the handling of digital content (an example of such information being the name of the copyright holder or the ID of the purchaser) is embedded invisibly in the digital information of an image. A technique for providing security and protecting copyrights in electronic communications systems has become the focus of attention as means for tracing material such as illegal copies which infringe copyrights.
Various methods used in electronic watermark techniques to embed data have been proposed. One of these methods is to embed information in the least significant bit of the image data. This method embeds bit information in image data X (or in spatial-frequency data thereof). The value of the least significant bit (LSB) of the image data is changed in dependence upon whether the information of the one bit to be embedded is xe2x80x9c0xe2x80x9d or xe2x80x9c1xe2x80x9d.
In a case where image data is xe2x80x9c101xe2x80x9d, for example, the binary notation representing this data is xe2x80x9c1100101xe2x80x9d. This binary notation will change to xe2x80x9c1100100xe2x80x9d if information xe2x80x9c0xe2x80x9d is embedded in this image data and to xe2x80x9c1100101xe2x80x9d if information xe2x80x9c1xe2x80x9d is embedded. Accordingly, the information that has been embedded is obtained by investigating the LSB of the image data.
Though this method is simple, information that has been embedded is lost when image data develops an error or when image data has been subjected to image processing. For example, even if only error information equivalent to one bit is added on, there is a direct effect upon embedded information. If a gamma conversion for grayscale processing of an image has been applied, the value of the LSB changes. In other words, even if watermark information has been embedded, it can be removed in a simple manner. In practical terms, therefore, this method is not entirely adequate in terms of resistance.
A method of quantizing image data in order to strengthen resistance is proposed by the applicant. FIG. 1, which is a diagram useful in describing quantization, illustrates a method of quantizing image data of a designated location at a quantization step width h.
As shown in FIG. 1, the image data X is divided at the step h. If the step h is 4, the quantization values will be 4, 8, 12, 16, . . . , 100, 104, . . . If the image data is xe2x80x9c101xe2x80x9d, the candidate for the quantization value will be xe2x80x9c100xe2x80x9d or xe2x80x9c104xe2x80x9d. Accordingly, the following rule is established:
(1) when embedded information is xe2x80x9c0xe2x80x9d, adopt the even-numbered quantization value; and
(2) when embedded information is xe2x80x9c1xe2x80x9d, adopt the odd-numbered quantization value.
Since the quantization value xe2x80x9c100xe2x80x9d is 4xc3x9725, this is odd-numbered, and since the quantization value xe2x80x9c104xe2x80x9d is 4xc3x9726, this is even-numbered. Accordingly, image data X having the value xe2x80x9c101xe2x80x9d is quantized to image data Xxe2x80x2 having the even-numbered value xe2x80x9c104xe2x80x9d when the embedded information is xe2x80x9c0xe2x80x9d, and to image data Xxe2x80x2 having the odd-numbered value xe2x80x9c100xe2x80x9d when the embedded information is xe2x80x9c1xe2x80x9d. Such quantization for embedding information is referred to as xe2x80x9crequantizationxe2x80x9d.
Information that has been embedded can be detected by dividing the requantized image data Xxe2x80x2 at the step h and following this rule:
(1) the embedded information is xe2x80x9c1xe2x80x9d if the quotient (Xxe2x80x2/h) is an odd number; and
(2) the embedded information is xe2x80x9c0xe2x80x9d if the quotient (Xxe2x80x2/h) is an even number.
More specifically, since 100/4=25 is an odd number, the embedded information is xe2x80x9c1xe2x80x9d, and since 104/4=26 is an even number, the embedded information is xe2x80x9c0xe2x80x9d.
If the requantization step width h is enlarged, resistance to error rises. For example, if data develops one bit""s worth of error, xe2x80x9c100xe2x80x9d becomes xe2x80x9c101xe2x80x9d or xe2x80x9c99xe2x80x9d and xe2x80x9c104xe2x80x9d becomes xe2x80x9c105xe2x80x9d or xe2x80x9c103xe2x80x9d. Accordingly, the detection rule cited above is changed as follows:
(1) the embedded information is xe2x80x9c1xe2x80x9d if the quotient (Xxe2x80x2/h) is an odd number after being rounded off; and
(2) the embedded information is xe2x80x9c0xe2x80x9d if the quotient (Xxe2x80x2/h) is an even number after being rounded off.
More specifically, since we have 101/4=25.25 and 99/4=24.75, xe2x80x9c25xe2x80x9d holds, and this is an odd value. The embedded information, therefore, becomes xe2x80x9c1xe2x80x9d. Further, since we have 105/4=26.25 and 103/4=25.75, xe2x80x9c26xe2x80x9d holds, and this is an even value. The embedded information, therefore, becomes xe2x80x9c0xe2x80x9d.
The requantization step width h can be used properly in conformity with the purpose of utilization as a parameter corresponding to the strength of resistance to error. The step width h is managed as key information because the same value is necessary when information is embedded and when it is detected.
In a case where information is embedded in image data by the above-described method, a decline in image quality becomes conspicuous, especially in flat portions of an image, and the requantization step width h cannot be enlarged. That is, when information is embedded in image data, there is a trade-off relationship between image quality and resistance as follows:
(1) if the requantization step width h is small, a decline in image quality does not occur but the resistance of the embedded information is low; and
(2) if the requantization step width h is enlarged, the resistance of the embedded information rises but a decline in image quality of flat portions of the image becomes conspicuous.
Accordingly, an object of the present invention is to suppress a decline in image quality and improve the resistance of embedded information when information is embedded in image data.
According to a preferred embodiment of the present invention, the foregoing object is attained by providing an image processing apparatus comprising determination means for determining image characteristics in the vicinity of a pixel of interest in which information is to be embedded, and control means for controlling, on the basis of result of determination by the determination means, a requantization step width when information is embedded in the pixel of interest.
Further, according to a preferred embodiment of the present invention, the foregoing object is attained by providing an image processing apparatus comprising determination means for determining image characteristics of an image block containing a frequency component in which information is to be embedded, and control means for controlling, on the basis of result of determination by the determination means, a requantization step width when information is embedded in the frequency component.
Further, according to a preferred embodiment of the present invention, the foregoing object is attained by providing an image processing apparatus comprising determination means for determining image characteristics of an image block containing a frequency component in which information is to be embedded; and
control means for controlling, on the basis of result of determination by said determination means, a requantization step width when information is embedded in the frequency component.
Further, according to a preferred embodiment of the present invention, the foregoing object is attained by providing an image processing apparatus comprising transformation means for dividing input image data into blocks of a prescribed size and performing an orthogonal transformation; determination means for determining image characteristics of the block based upon values of frequency components in the vicinity of a frequency component in which information is to be embedded; and embedding means for requantizing the frequency component by a step width that is based upon result of determination by the determination means, thereby embedding information.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.